import React, { Component } from 'react';
import Search from './components/Search';
import List from './components/List';

export default class App extends Component {
    state = {
        items: []
    }
    render() {
        return (
            <div className="container">
                <Search getUserContent={this.getUserContent} />
                <List showdata={this.state.items} />

            </div>
        )
    }

    //把Search组件发送的用户信息放在自己的state中
    getUserContent = (items) => {
        this.setState({ items: items })
    }



}
